package com.cjm.one.webmanager.service.coupon.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjm.one.common.result.Result;
import com.cjm.one.coupon.client.CouponInfoClient;
import com.cjm.one.model.coupon.dto.CouponInfoDto;
import com.cjm.one.model.coupon.entity.CouponInfo;
import com.cjm.one.model.coupon.vo.CouponInfoVo;
import com.cjm.one.webmanager.service.coupon.CouponInfoService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class CouponInfoServiceImpl implements CouponInfoService {
    @Resource
    private CouponInfoClient couponInfoClient;
    @Override
    public Result<Page<CouponInfo>> list(Long current, Long size, Integer rangeType, String couponName, Integer status) {
        return couponInfoClient.list(current,size,rangeType,couponName,status);
    }

    @Override
    public Result<Boolean> add(CouponInfoDto couponInfoDto) {
        return couponInfoClient.add(couponInfoDto);
    }

    @Override
    public Result<Boolean> update(CouponInfoDto couponInfoDto) {
        return couponInfoClient.update(couponInfoDto);
    }

    @Override
    public Result<Boolean> delete(Long id) {
        return couponInfoClient.delete(id);
    }

    @Override
    public Result<CouponInfoVo> get(Long id) {
        return couponInfoClient.get(id);
    }
}
